package org.lex.dbq.model.bo;

import java.util.Properties;

public class JdbcUrl {
	private static final String USER = "user";
	private static final String PASSWORD = "password";

	private String url = null;
	private DriverConfig driver = null;

	private Properties properties = new Properties();

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public DriverConfig getDriver() {
		return driver;
	}

	public void setDriver(DriverConfig driverClass) {
		this.driver = driverClass;
	}

	public Properties getProperties() {
		return properties;
	}

	public String getUser() {
		return properties.getProperty(USER);
	}

	public void setUser(String user) {
		properties.setProperty(JdbcUrl.USER, user);
	}

	public String getPassword() {
		return properties.getProperty(PASSWORD);
	}

	public void setPassword(String password) {
		properties.setProperty(JdbcUrl.PASSWORD, password);
	}

	public void setProperty(String key, String value) {
		properties.setProperty(key, value);
	}

	public String getProperty(String key) {
		return properties.getProperty(key);
	}
}
